﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;

namespace HNAlbum.Component.NivoSlider
{
    /// <summary>
    /// Implement a Nivo Slider image item
    /// </summary>
    public class NivoSliderItem : HyperLink
    {
        private string _imageSrc = string.Empty;
        public string ImageSrc
        {
            get { return _imageSrc; }
        }

        private string _imageCaption = string.Empty;
        public string ImageCaption
        {
            get { return _imageCaption; }
        }
        /// <summary>
        /// Construct a Nivo Slider item
        /// </summary>
        public NivoSliderItem(string imageSrc, string imageCaption)
        {
            this.NavigateUrl = "#";
            Image img = new Image();
            this.Controls.Add(img);
            img.ImageUrl = imageSrc;
            img.Attributes.Add("title", imageCaption);
            img.GenerateEmptyAlternateText = true;
        }
    }
}